-- GENERATED SPELL FOR [Blackhand Dreadweaver] --


function spell0_9817(pUnit, Event) --@Curse of Thorns,n/a--
pUnit:FullCastSpellOnTarget(16247,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_9817', 2000, 1)
end

function spell1_9817(pUnit, Event) --@Shadow Bolt,n/a--
pUnit:FullCastSpellOnTarget(12739,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_9817', 3000, 1)
end

function spell2_9817(pUnit, Event) --@Veil of Shadow,Heal--
pUnit:FullCastSpellOnTarget(7068,pUnit)
pUnit:RegisterEvent('Sorts_9817', 16500, 1)
end

function Sorts_9817(pUnit, Event)
local choix_sorts_9817 = math.random(0, 2)
if choix_sorts_9817 == 0 then
pUnit:RegisterEvent('spell0_9817', 1, 1)
end
if choix_sorts_9817 == 1 then
pUnit:RegisterEvent('spell1_9817', 1, 1)
end
if choix_sorts_9817 == 2 then
pUnit:RegisterEvent('spell2_9817', 1, 1)
end
end

function mob9817_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_9817', math.random(1500, 3000), 1)
end

function mob9817_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob9817_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob9817_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(9817, 1, 'mob9817_Action')
RegisterUnitEvent(9817, 2, 'mob9817_Leave')
RegisterUnitEvent(9817, 3, 'mob9817_Kill')
RegisterUnitEvent(9817, 4, 'mob9817_Die')
